import { RouteRecordRaw, createRouter, createWebHashHistory } from 'vue-router';

const routes: RouteRecordRaw[] = [
  {
    path: '/',
    redirect: '/index',
  },
  {
    path: '/index',
    component: () => import('/@views/index/index.vue'),
  },
  {
    path: '/preview',
    component: () => import('/@views/preview/preview.vue'),
  },
  {
    path: '/sendEmail',
    component: () => import('/@views/sendEmail/index.vue'),
  },
  {
    path: '/common',
    component: () => import('/@views/common/index.vue'),
  },
  {
    path: '/404',
    component: () => import('/@views/container/404.vue'),
    name: '404',
  },
  {
    path: '/:pathMatch(.*)*',
    redirect: '/404',
  },
];

const router = createRouter({
  history: createWebHashHistory(),
  routes,
});

export default router;
